package org.sdp.pearproject.dto.convert;

import org.sdp.pearproject.dao.domain.*;
import org.sdp.pearproject.dto.request.*;
import java.util.Date;

/**
 * @ClassName: InviteLinkAddRequestConvert
 * @Description:
 * @Author: SDP
 * @Date: 2022-07-14
 * @Version: 1.0
 * Table: pear_invite_link
 * Comment:
 * 邀请链接表
 */
public class InviteLinkAddRequestConvert extends BaseConvert {
    public static InviteLinkWithBLOBs convert(InviteLinkAddRequest request) throws Exception {
        InviteLinkWithBLOBs daoRequest = new InviteLinkWithBLOBs();
        copyProperties(request, daoRequest);

        daoRequest.setCode(daoRequest.getCode() == null ? null : daoRequest.getCode().trim());
        daoRequest.setCreateBy(daoRequest.getCreateBy() == null ? null : daoRequest.getCreateBy().trim());
        daoRequest.setInviteType(daoRequest.getInviteType() == null ? null : daoRequest.getInviteType().trim());
        daoRequest.setSourceCode(daoRequest.getSourceCode() == null ? null : daoRequest.getSourceCode().trim());
        daoRequest.setOverTime(daoRequest.getOverTime() == null ? null : daoRequest.getOverTime().trim());

        return daoRequest;
    }
}
